package demo.consumer;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.stereotype.Component;


@Component
@EnableBinding(OmsSink.class)
public class Consumer {

    private Logger logger = LoggerFactory.getLogger(Consumer.class);

    @StreamListener(OmsSink.TEST_CHANNEL)
    public void inputChannel(String message) {
        logger.info("开始消费Test信道 消息:{}", message);
    }

    @StreamListener(OmsSink.TEST_DLT_CHANNEL)
    public void testDltChannel(String message) {
        logger.info("开始消费 Topic-name.dlt 信道 消息:{}", message);
    }
}
